#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:多个装饰器的使用.py
# author: 马国鑫
# datetime:2022/3/18 22:07
# software: PyCharm

"""
this is function  description 
"""


# import module your need

def func_out01(func):
    print('this is func_out01')

    def func_in01():
        print('this is func_in01')
        func()

    return func_in01


def func_out02(func):
    print('this is func_out02')

    def func_in02():
        print('this is func_in02')
        func()

    return func_in02


# 就近原则，谁距离login近谁先装饰
@func_out02  # 相当于 login = func_out02(login)
@func_out01  # 相当于 login = func_out01(login)
def login():
    print('login')


login()